These sources are examples for creating CopyPaste Tools. CopyPaste is an extension that can be found on shareware sites on the net. CopyPaste adds more clipboards and clipboard tools to the Mac. CopyPaste Tools are actually 68k FKey coderesources created with Metrowerks C/Pascal compilers. These Fkey/code resources are what we use in CopyPaste as tools to work on the clipboard contents. Now you can use these examples to make new tools and install them in CopyPaste. Add new abilities to the Mac with CopyPaste and tools that you create. We would enjoy seeing your creations. Feel free to send them to one of us so we can add them to this library of FKey source code examples and perhaps include some of them in the next version of CopyPaste.
They examples are copyrighted by Peter Hoerster and released for free use in any Shareware or Freeware product as my way to thank all programmers who share code snippets. You may put these sources on any CD ROM or any Archive Server but you may not sell them. Please send comments and programming questions to Peter Hoerster at <hoerster@muenster.de>
The sources are not commented, but fairly easy to understand as they only do three things: They take a clip from the deskscrap, convert it and put it back to the deskscrap again.
These FKey utilities are used in the shareware utility CopyPaste from the same author.
CopyPaste is the ultimate multi clipboard utility for using ten clipboards. It works as follows: Type the usual keyboard command for Copy or Cut and then a number between 1 and 9 before releasing the command key. Paste in the same way. In addition to the normal clip without a number you now have nine clips more. In case you’ve forgotten which clip goes under any number or you prefer the mouse to the keyboard, you’ll find them listed in new submenus in any application’s edit menu. It works in most applications and between them. Other features of CopyPaste are Clip Archive, Application Switcher, Edit Clipboard, Paste Sequence, Tag and Drop and more.
Now a short description of the FKeys:
• "Short Date insert" inserts the short form of the current date (11. 18. 1995) into the clipboard,
• "Long Date insert" inserts the long form of the current date (Saturday November 18, 1995)into the clipboard,
• "Time insert" inserts the current time into the clipboard
• "Upper Case" converts the text in clipboard to upper case,
• "Lower Case" converts the text in the clipboard to lower case,
• "Word Caps" heads each word in the clipboard with a capital,
• "Sentence Caps" heads each sentence in the clipboard with a capital,
• "One Space only" deletes double spaces from the copied text.
• "One CR only" deletes double returns from copied text.
• "Tab->4 Spaces" converts one tabulator character in the clipboard to four spaces
• "4 Spaces -> Tab" converts four spaces in the clipboard to one tabulator character
• "Comment" and "Uncomment" are variations of the source code of Symantec's block comment FKey. It serves to mark text in Pascal source code as comments to the compiler.
• "Save Text or Pict" saves a clip to disk,
• "Open Text or Pict" loads text or a picture into the clipboard.
• Bahá’í Date converts the date in the open clip into the date form of the Bahá’í religion. If no valid date is found in the clip it inserts the Bahá’í date of the day, displaying the English or German date form detected. The Bahá’í religion was founded by the prophet Bahá’u’lláh and has a year of 19 months of 19 days each. Synchronisation with the sun is achieved by the insertion of 4 days (or 5 in leap years) at the beginning of the fasting month. The number 19 has a symbolical value for the Bahá’í’s because the Arabic word unity has a numerical value of 19 and the Bahá’í faith teaches the unity of all mankind, the unity of religions and the unity of races.
The reason I embarked on programming was to have the Bahá’í date on my computer. You may not need the Bahá’í date but it is there simply because it was the reason behind my whole venture.